<!DOCTYPE HTML>
<html lang="zh">
<head>
{% block head %}
    <meta charset="UTF-8">
    <meta name="format-detection" content="telephone=no">
    <meta name="HandheldFriendly" content="True">

    {% block viewport %}
    <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
    {% endblock %}

    {# 页面title，可以继承替换 #}
    <title>{% block title %}面包旅行{% endblock %}</title>

    {% block css_common %}
    <!-- build:css(.tmp) css/common/base.css -->
    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='mobile/css/common/base.css') }}">
    <!-- endbuild -->
    {% endblock %}

    <style type="text/css">
        {% if app_version and ( user_agent == 1 or user_agent == 2 ) %}
            /*app里 ios 版本使用app HiraginoSansGB加粗字体*/
            .font-ios-bold{
                font-family: "HiraginoSansGB-Regular","Gotham","Helvetica Neue", "Luxi Sans", "DejaVu Sans", Tahoma, "Hiragino Sans GB", STHeiti !important;
                font-weight: normal !important;
            }
        {% endif %}
    </style>

    {% if app_version and ( user_agent == 1 or user_agent == 2 ) %}
    <script>
        if(/iPhone OS (\d)/.test(navigator.userAgent)){
            var version = parseInt(RegExp.$1);
            //app里 ios 9以上的版本，不使用 HiraginoSansGB 字体
            if(version >= 9){
                document.write('<style type="text/css">body{font-family:"Gotham" !important;}.font-ios-bold{font-family: "Gotham" !important;font-weight: bold !important;}</style>');
            }
        }

    </script>
    {% endif %}

    {# 页面自定义css，可以继承替换 #}
    {% block css_ex %}
    {% endblock %}

    {# 自定义 App 顶部标题，分享、关闭按钮 #}
    {% block app_header %}
    {% endblock %}

    <script>
    //数据中心方法
    (function(){
        var BT = {};
        var _data = {};
        BT.context = function (key, value) {
            var length = arguments.length;
            if (length > 1) {
                _data[key] = value;
            } else if (length == 1) {
                if (typeof key == 'object') {
                    for (var k in key) {
                        if (key.hasOwnProperty(k)) {
                            _data[k] = key[k];
                        }
                    }
                } else {
                    return _data[key];
                }
            }
        };
        'BT' in window || (window.BT = BT);
    })();
    BT.context('USER_ID', {{ request.user.id|default("null") }});
    var MAP_URL = "http://{{ GOOGLE_MAP_DOMAIN }}/maps/api/js?sensor=false&language=zh";
    var GMAPS_API_DOMAIN = "{{ GMAPS_API_DOMAIN }}";
    var STATIC_URL = "{{ STATIC_URL }}";

    </script>

    {% block baidu_tongji %}
    <script>
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "//hm.baidu.com/hm.js?39ccc5353de4e1969b414e80e516d5a7";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
    </script>
    {% endblock %}

{% endblock %}
</head>
<body class="{% block body_class %}{% endblock %}" ontouchstart="" data-user-agent="{{ user_agent }}" data-csrf="{{ csrf_token }}" data-version="{{ app_version }}" ng-app="breadTrip">
    {# 页面内容，可以继承替换 #}
    {% block content %}{% endblock %}

    {% block js_zepto %}
    <!-- build:js js/common/lib/zepto.js -->
    <script src="{{ url_for('static', filename='mobile/js/common/lib/zepto.js') }}"></script>
    <!-- endbuild -->
    {% endblock %}

    {# app-schema脚本加载，可以继承设置为空 #}
    {% block js_app %}
    <!-- build:js js/common/lib/app-schema.js -->
    <script src="{{ url_for('static', filename='mobile/js/common/lib/app-schema') }}.js"></script>
    <!-- endbuild -->
    {% endblock %}

    {# zepto-touch脚本加载，可以继承设置为空 #}
    {% block js_touch %}
    <!-- build:js js/common/lib/zepto-touch.js -->
    <script src="{{ url_for('static', filename='mobile/js/common/lib/zepto-touch') }}.js"></script>
    <!-- endbuild -->
    {% endblock %}

    {# swipe脚本加载，可以继承设置为空 #}
    {% block js_swipe %}
    <!-- build:js js/common/lib/swipe.js -->
    <script src="{{ url_for('static', filename='mobile/js/common/lib/swipe.js') }}"></script>
    <!-- endbuild -->
    {% endblock %}

    {# 页面自定义js，可以继承替换 #}
    {% block js_ex %}

    {% endblock %}

</body>
</html>
